package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	fmt.Print("请输入任意长度的字符串：")
	str, _ := reader.ReadString('\n')
	str = str[:len(str)-1]
	str1 := ""
	for index, _ := range str {
		str1 += string(str[len(str)-index-1])
	}
	fmt.Println(str)
	fmt.Println(str1)

	if str == str1 {
		fmt.Printf("字符串：%s 是回文", str)
	}

}
